fix(worker): normalize encoded document filenames - #386
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.docfilename patternProduction evidence
This fixes the failure in Logfire trace
01a0770227cb4797dc15fe52b0b3ab15(job_53f9d9d7b6d7). LibreOffice returned exit code 0 but wrote the.docxunder the decoded Chinese output directory, while the worker checked for an encoded expected path. The same document succeeded in production when its decoded filename was used.Verification
uv run --project apps/worker pytest apps/worker/tests/unit/test_internal_parse_name.py -q— 2 passeduv run --project apps/api pytest apps/api/tests/unit/test_document_ingestion_filename.py -q— 1 passedgit diff --check— passedThe full worker unit suite was not runnable locally because required environment settings are absent (
S3_BUCKET_NAME,S3_TEMP_PATH,DATABASE_URL,TMP_PATH).